# The user needs to assign these for their project
CCFILES=Main.cc Process.cc ReadIn.cc Scheduler.cc MultQueue.cc Processor.cc 
EXEC=program

# The included dependency file contains all the incremental compilation info,
# however we use the implicit rule for making each one which is (simplified):
# g++ $(CXXFLAGS) -c -o Foo.o Foo.cc
# Thus we place our compiler flags into this default variable
CXXFLAGS=-Wall

# Create all the needed .o file names from the .cc files
OFILES=$(CCFILES:.cc=.o)

# The main linking rule
$(EXEC): $(OFILES)
	g++ -o $(EXEC) $(OFILES)

# Clean not only cleans up object files, but also recreates the dependency file
clean:
	rm -f *~
	rm -f *.o
	rm -f $(EXEC)
	g++ $(CCFILES) -MM > $(EXEC).d

# Always include the dependency file unless we run the clean command,
# which will make it even if it does not exist
ifneq ($(MAKECMDGOALS), clean)
include $(EXEC).d
endif


